#pragma once


class Vector2;


//////////////////////////////////////////////////////////////////////////
/// convex domain
class IConvexDomain2
{
public:
	virtual ~IConvexDomain2() {}

	/** @return point that must lie inside this domain */
	virtual const Vector2 internalPoint() const = 0;	
	/** @note this is used by collision detection algorithm
	 *        which computes Minkowski difference by support mapping.
	 *  @attention normal is not always normalized! */
	virtual const Vector2 supportPoint(const Vector2& normal) const = 0;
};

//////////////////////////////////////////////////////////////////////////

#include "IBoundary2.h"

class IStackAllocator;


/// this has its boundary.
class IBounded2 : public IConvexDomain2
{
public:
	virtual IEdgeIterator2* boundary(IStackAllocator& stack) const = 0;
};

/** @todo remove this class */
class IImplicitBounded2 : public IBounded2
{
public:
	virtual IEdge2* trim(
		const Vector2&		startNormal,
		const Vector2&		endNormal,
		IStackAllocator&	alloc
	) const = 0;
};


class IExplicitBounded2 : public IBounded2
{
public:
	virtual ILinearEdgeIterator2* boundary(IStackAllocator& stack) const = 0;
};


